home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / lay_wgtb.ipb < prev    next >
Text File  |  1993-08-23  |  2KB  |  70 lines

  1. inst3.1        ! Feb 7 1989
  2. !****************************************************************
  3. !*                                *
  4. !*    Bar chart of weights between two layers            *
  5. !*                                *
  6. !****************************************************************
  7. !
  8. !    This script builds an instrument which displays the
  9. !    weights between two layers as a bar chart
  10. !
  11. @Vars    NDSP            !Prompt for layers and position
  12.  
  13. @NrLX                !Get layer index of near PE
  14. ?NPEl    0
  15. >blt laberr
  16. @SlLX                !Get layer index of selected PE
  17. ?SPEl    0
  18. >bge lab0
  19. :laberr
  20. @Err    "Non-constant source and destination layers required"
  21. :lab0
  22. =PNam    NPEl            !Write source layer number to name
  23. +PNam    "->"
  24. +PNam    SPEl            !Append destination layer number to name
  25. @PbAS                !Add Probe
  26. ?PbSt    0            !Check status of probe
  27. >beq    lab3            !Already there, don't add component
  28. @PALC                !Add Layer Connection to probe
  29. :lab3
  30. !    *** Build Instrument ***
  31.  
  32. @ILdD                !load default instrument
  33. =ITit    "Layer "        !Instrument title
  34. +ITit    NPEl            !Append source layer number to title
  35. +ITit    "->"            !Instrument title
  36. +ITit    SPEl            !Append destination layer number to title
  37. =Ivmn    &vmn
  38. =Ivmx    &vmx
  39. =LayN    NPEl            !Pointed to (source) layer
  40. @LLly                !Load it
  41. =n0    Lpes            !number of PEs in pointed to layer
  42. =LayN    SPEl            !Selected (destinataion) layer
  43. @LLly                !Load it
  44. =n1    Lpes            !number of PEs in selected layer
  45. =Ignx    n0
  46. =n2    0
  47. =n3    n1
  48. ! n2 = n0 * n1:
  49. :labloop
  50. +n2    n0
  51. -n3    1
  52. ?n3    0
  53. >bgt    labloop
  54. =Inpl    n2
  55. ! height and width:
  56. =f0    n0
  57. =f1    n1
  58. /f0    0.05
  59. /f1    0.07
  60. =Iwdt    f0            !Width of graph
  61. =Ihgt    f1            !height of graph
  62.  
  63. =IGVr    "Weight"
  64. =IGTy    "Bar"
  65. =ITMd    0            !No transformation
  66. =IRcA    0            !Not active in recall
  67. =ILDv    10            !Every 10 iterations
  68. =IPrb    PNam            !Point to probe
  69. @IAdd                !Now create instrument
  70.